import { createApp } from 'vue'
import { createPinia } from 'pinia'
import '@/assets/css/variable.css'
import '@/assets/css/reset.css'

import App from './App.vue'
import router from './frame/router'
import Apis from './api'
import Utils from './frame/utils'
import Plugins from './frame/plugins'
import Dict from './frame/dict'
import 'virtual:svg-icons-register'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import baseComponents from './frame/components'

import vTrack from './frame/track/index.js'

const app = createApp(App)

window.$env = import.meta.env
Object.freeze(window.$env)

app.config.warnHandler = () => null

app.directive('track', vTrack)

app.use(createPinia()).use(Apis).use(Utils).use(Plugins).use(Dict).use(ElementPlus, { locale: zhCn }).use(baseComponents).use(router).mount('#app')
